# -*- coding: utf-8 -*-

from __future__ import unicode_literals

import logging
from logging.config import dictConfig

DEFAULT_CONFIG = dict(
    version=1,
    disable_existing_loggers=False,
    formatters={
        'f': {
            'format': '%(asctime)s, %(levelname)s, %(name)s, %(message)s',
            'datefmt': '%Y-%m-%dT%H:%M:%S',
        }
    },
    handlers={
        'h': {
            'class': 'logging.StreamHandler',
            'stream': 'ext://sys.stdout',
            'formatter': 'f',
            'level': logging.INFO
        }
    },
    root={
        'handlers': ['h'],
        'level': logging.INFO,
    },
)


def setup_default_logging():
    dictConfig(DEFAULT_CONFIG)
